package com.gxa.hotel.core.pojo.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;

import java.time.LocalDateTime;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author hotel
 * @since 2022-07-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("tb_room_state")
public class RoomState implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 编号
     */
      @TableId(value = "rs_id", type = IdType.AUTO)
    private Integer rsId;

    /**
     * 房间状态
     */
    private Boolean rsState;

    /**
     * 剩余数量
     */
    private Integer rsRestNum;

    /**
     * 售出数量
     */
    private Integer rsSaledNum;

    /**
     * 价格
     */
    private Double rsPrice;

    /**
     * 房型
     */
    private String rsType;

    /**
     * 允许订房的日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using= LocalDateTimeDeserializer.class)
    private LocalDateTime rsDate;

    /**
     * 房型对应的id
     */
    private Integer rsRid;

    /**
     * 房型的详细信息
     */
    private List<RoomTag> tags;

}
